<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单提交成功页</title>
    <link rel="stylesheet" href="index.css">
</head>

<body>
    <header>
        <div class="nav">
            <!-- 头部左侧文字链接 -->
            <ul class="nav-left">
                <li class="conweixin">
                    <a href="javascript:;">关注</a>
                    <div class="weixin">
                        <div class="weixin-con">
                            <img src="img/weChat.jpg" alt="">
                            <p>关注公众号</p>
                        </div>
                    </div>
                </li>
                <li class="loadapp">
                    <a href="javascript:;">下载APP</a>
                    <div class="app">
                        <div class="app-con">
                            <img src="img/app.jpg" alt="">
                            <p>优购app下载</p>
                        </div>
                    </div>
                </li>
            </ul>

            <!-- 头部右侧文字链接 -->
            <ul class="nav-right">
                <li>
                    <a href="javascript:;" class="mylist">我的订单</a>
                </li>
                <li><a href="index.html">回到首页</a></li>
                <li class="collect">
                    <a href="javascript:;"><i></i>收藏</a>
                </li>
                <li class="bag">
                    <a href="javascript:;"><i></i>购物袋</a>
                </li>
                <li class="publicword">
                    <a href="javascript:;">公告</a>
                    <div class="public">
                        <ul class="public-con">
                            <li><a href="javascript:;" class="red">近期物流情况安排通知</a></li>
                            <li><a href="javascript:;">优购客服电话变更</a></li>
                            <li><a href="javascript:;">关闭分享购频道</a></li>
                            <li><a href="javascript:;">提醒会员谨防诈骗电话</a></li>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>
    </header>

    <h1 style="text-align: center;color: green;width: 100%;">已支付成功</h1>
</body>

</html>

<script src="jquery.min.js"></script>
<script src="index.js"></script>

<script>
    //判断是否登录
    let uname = sessionStorage.getItem("uname");
    // console.log(uname);
    if (uname) {

        $(".bag a").attr("href", `/car?username=${uname}`);


        $(".mylist").click(function() {
            let ispay = 1;

            $(this).attr("href", `/look?username=${uname}&ispay=${ispay}`)
        })

    } else {
        $(".bag a").click(function() {

            alert("请先登录/注册您的账号")
        })
    }
</script>